#define _CRT_SECURE_NO_WARNINGS 1

#include<stdio.h>
int main()
{
    long long test = 0;
    scanf("%lld", &test);
    do
    {
        long long n, max, min, ave = 0;
        scanf("%lld %lld %lld %lld", &n, &max, &min, &ave);
        long long num = n * ave;
        if (((num - max - ((n - 1) * min)) >= 0) && (max >= min) && (num - min - (n - 1) * max) <= 0)
            printf("yes\n");
        else
            printf("no\n");
    } while (--test);
    return 0;
}